package com.itheima.rabbitmqconsumerspringboot.listener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class ConsumerListener {
    /**
     * 监听某个队列的消息
     * @param message
     */
    @RabbitListener(queues = "queue_dlx")
    public void ListenerQueue(Message message) {
        System.out.println(new String(message.getBody()));
    }
}